<%= header %>
<script src="104-hard-nav-onload-fired-xhr-after-load-boomr-delayed.js" type="text/javascript"></script>

<script type="text/javascript">
(function(w, d) {
	var script, xhr, json, img;

	function onloadCb() {
		script = d.createElement("script");
		script.src = "../../build/boomerang-latest-debug.js";
		d.head.appendChild(script);

		setTimeout(function() {
			xhr = new w.XMLHttpRequest();
			xhr.addEventListener("load", function() {
				img = d.createElement("img");
				// in FF, this request needs to be slow enough so that the request hasn't completed by the time
				// the mutation observer runs otherwise node.naturalWidth will already be defined and the request
				// won't be tracked.
				img.src = "/delay?delay=3000&file=pages/12-react/support/img.jpg&id=xhr" + Math.random();
				d.body.appendChild(img);
			});
			xhr.open("GET", "/delay?delay=500&file=pages/12-react/support/widgets.json", true);
			xhr.send(null);
		}, 100);
	}

	if (d.addEventListener) {
		w.addEventListener("load", onloadCb);
	}
	else if (d.attachEvent) {
		w.attachEvent("onpropertychange", function(e) {
			e = e || w.event;
			if (e && e.propertyName === "onload") {
				onloadCb();
			}
		});
	}
}(this, this.document));
</script>
<img src="/delay?delay=1000&file=pages/12-react/support/img.jpg&id=home"/>
<script>
BOOMR_test.init({
	autorun: false,
	History: {
		enabled: true,
		auto: true
	},
	testAfterOnBeacon: true
});
</script>
<%= footer %>
